 <%--
 *  File:  FileRuleConfigMainEdit.jsp
 *  Desc:	
 *
 *  Date	  :	 2010/07/22      		    
 *  Author	:  banshang	
 *
 *  Copyright (C) 2000 - 2008 Oval Technologies, Inc.
 *  All rights reserved.
 *
 *  This software is the confidential and proprietary information of Oval
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
--%>
<%
  //init param
  String privilegeCode = "E0511";
  String strModuleName = "CFM";
  String contextPath = request.getContextPath();
%>
<%@ include file="/inc/CommonHeader.inc" %>

<html>
<head>
<title>FileRuleConfigMainEdit</title>
<PageFlow:CheckPageFlow pageName="p_fileruleconfigmain"/>
<%@ include file="/inc/CatchError.inc" %>
<%
 String strFlag=request.getParameter("displayflag");
%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="<%=contextPath%>/css/<%= strLanguageCode %>/main.css" type="text/css">
<script language="JavaScript" src="<%=contextPath%>/css/<%= strLanguageCode %>/script.js"></script>
<script language="JavaScript" src="<%=contextPath%>/js/ScriptLib.js"></script>
<%@ include file="/inc/NewCalendar.inc" %>

<%--  edit page related functions   --%>
<%if(!isView){%><script language="JavaScript">

function page_save()
{
   if(!checkForm(cform))   return;
 //   formatDate(cform);
	cform.actionname.value = "save";
	cform.target = "_parent";
	isRunning = true;
	cform.submit();
}
</script><%}%>

<%--  other functions   --%>
<script language="JavaScript">
function hasHeader(){
	var rowcountspan = document.getElementById("rowcount");
	var hasheader = document.cform.hasheader.value;
	if(hasheader == 1){
		rowcountspan.style.display='inline';
		document.cform.headerlinecount.command='positive';
	}else{
		document.cform.headerlinecount.value=' ';
		rowcountspan.style.display='none';
		document.cform.headerlinecount.command='';
	}
}
function page_back(){
	parent.location.href="FileRuleConfigSummary.jsp?<%=OvalTools.randomURL()%>";
}
</script>
</head>
<%
	HashMap fileruleconfiginfo = (HashMap)pageContext.getAttribute("maininfo");
	if(fileruleconfiginfo == null) fileruleconfiginfo = new HashMap();
	
	Integer fileruleconfigid = (Integer)fileruleconfiginfo.get("fileruleconfigid");
	boolean readonlyFlag = false;
	String styleStr = "";
	if(fileruleconfigid != null){
		readonlyFlag = true;
		styleStr = "border:0px;";
	}
%>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" style="overflow: auto;">
<form name="cform" method="post" action="<%=contextPath%>/Dispatcher">
    <input type="hidden" name="pagename" value="p_fileruleconfigmain">
    <input type="hidden" name="actionname">

<table border=0 cellpadding=0 cellspacing=0 width="100%">
  <tr>
    <td valign=top>
      <table border=0 cellpadding=1 cellspacing=0 width="100%">
        <tr>
          <td bgcolor=#000000 style="PADDING-BOTTOM: 1px; PADDING-LEFT: 1px; PADDING-RIGHT: 1px; PADDING-TOP: 0px">
            <table bgcolor=#000000 border=0 cellpadding=0 cellspacing=0 width="100%">
              <tr>
                <td  bgcolor=#ffffff style="PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; PADDING-TOP: 3px" valign="top">
                  <div id=div2 style="HEIGHT: 415px; OVERFLOW: auto;">
                    <table border="1" cellspacing="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" align="center" width="100%" cellpadding="1">

<%--    top function buttons    --%>
<% if(!isView){%>
                      <tr>
                        <td colspan="4" class="td_right" height="18">
                          <a onclick="page_save()"><custom:button type="2" label="L_Save" imgsrc="save_btn.gif" border="0" /></a>
                        </td>
                      </tr>
<%}%>

<%--    main trs    --%>
                      <tr>
                        <td width="150" class="<%=needClass%>" id="autocode"> <%=label.getLabelName("L_FileNameRuleCode")+label.getLabelName("L_Colon")%></td>
                        <td width="300"> <custom:text name="maininfo" property="fileruleconfigcode" size="20" command="notnull"  label="L_FileRuleConfigCode" readonly="<%= readonlyFlag%>" style="<%=styleStr %>"/></td>
                        <td width="150" class="<%=needClass%>" ><%=label.getLabelName("L_FileNameRuleDesc")+label.getLabelName("L_Colon")%></td>
                        <td> <custom:text name="maininfo" property="fileruleconfigdesc"   size="30" command="notnull" label="L_FileRuleConfigDesc"  /></td>
                        
                      </tr>
                      <%--  
                      <tr>
                        <td class="<%=needClass%>"> <%=label.getLabelName("L_FileDataTypyName")+label.getLabelName("L_Colon")%></td>
                        <td > <custom:selectdic name="maininfo" property="filedatatype" dictType="DataCleanType" command="notnull" label="L_FileDataTypyName"  onchange="cform.tablename.value=cform.__tablename.options[this.selectedIndex].text;"  /></td>
                        <td class="<%=needClass%>" ><%=label.getLabelName("L_TableName")+label.getLabelName("L_Colon")%></td>
                        <td> 
                        	<custom:selectdic name="maininfo" property="filedatatype" dictType="DataCleanTypeVT" changedName="__tablename"  style="display:none" />
                        	<custom:text style="border:1px #7F9DB9 solid; width:300px;" name="maininfo" property="tablename"  size="20" command="notnull" label="L_TableName" readonly="true" />
                        	<script>
                        	cform.tablename.value=cform.__tablename.options[cform.__tablename.selectedIndex].text;
                        	</script>
                        </td>
                      	
                      </tr>
                      --%>
                      <tr>
                        <td class="<%=needClass%>"> <%=label.getLabelName("L_Separator")+label.getLabelName("L_Colon")%></td>
                        <td > <custom:text name="maininfo" property="separator"   size="20" command="notnull" label="L_Separator"  /></td>
                        <td class="td-text"> <%=label.getLabelName("L_CreateDate")+label.getLabelName("L_Colon")%></td>
                       <%if("new".equals(strFlag)){%>
                        <td  colspan="1"><%=OvalTools.getDate((String)session.getAttribute("dateformat"))%></td>
                       <%}else{%>
                        <td  colspan="1"> <custom:write name="maininfo" property="createdate" dataType="date"  dataFormatName="dateformat" nbsp="true"/></td>
                       <%}%>
                      </tr>
                     
  
<%--    form hidden elements    --%>
                      <tr>
                        <td style="display:none">
                        <%
                         
                         if("new".equals(strFlag)){
                        %>
                        <input type="hidden" name="status" value="10"/>
                        <custom:hidden name="userinfo" property="orgid" scope="session"/>
                        
            	            <%}else{%>
            	            <custom:hidden name="maininfo" property="fileruleconfigid" />
            	            <%}%>
                        </td>
                      </tr>

                    </table>
                  </div>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
      <table width="100%" cellspacing="0" cellpadding="0">
         <tr><td class="summary_top"></td></tr>
         <tr>
           <td class="td_center">
          
             <a onclick="page_back();"><custom:button type="1" label="L_Back" imgsrc="new.gif" border="0" style="width:60"/></a>
          
           </td>
         </tr>
      </table>
    </td>
  </tr>
</table>
</form>
</body>

</html>